package com.ruoyi.manager.service;

import java.time.LocalDate;
import java.util.List;

import com.github.pagehelper.Page;
import com.ruoyi.manager.domain.Member;
import org.apache.ibatis.transaction.Transaction;

/**
 * memberService接口
 * 
 * @author ruoyi
 * @date 2025-08-12
 */
public interface IMemberService 
{
    /**
     * 查询member
     * 
     * @param id member主键
     * @return member
     */
    public Member selectMemberById(Long id);

    /**
     * 查询member列表
     * 
     * @param member member
     * @return member集合
     */
    public List<Member> selectMemberList(Member member);

    /**
     * 新增member
     * 
     * @param member member
     * @return 结果
     */
    public int insertMember(Member member);

    /**
     * 修改member
     * 
     * @param member member
     * @return 结果
     */
    public int updateMember(Member member);

    /**
     * 批量删除member
     * 
     * @param ids 需要删除的member主键集合
     * @return 结果
     */
    public int deleteMemberByIds(Long[] ids);

    /**
     * 删除member信息
     * 
     * @param id member主键
     * @return 结果
     */
    public int deleteMemberById(Long id);


    /**
     * 根据会员名称和手机号查询会员信息
     * @param memberName
     * @param phone
     * @return
     */
    Member selectByNameAndPhone(String memberName, String phone);

    /**
     * 登录
     * @param phone
     * @param password
     * @return
     */
    Member login(String phone, String password);

    /**
     * 获取当前用户预约信息
     * @param userId
     * @param type
     * @param createTime
     * @param status
     * @return
     */
    Page<Transaction> getReservations(Integer userId, Integer type, LocalDate createTime, Integer status);


    /**
     * 取消预约
     * @param id
     */
    void cancelReservation(Long id);


    /**
     * 充值
     * @param phone
     * @param password
     * @param amount
     */
    void recharge(String phone, String password, Long amount);


    /**
     * 验证预约
     * @param id
     */
    void verifyReservation(Long id);
}
